# add_mlir_dialect(toyOps toy)
# add_mlir_doc(toyDialect toyDialect toy/ -gen-dialect-doc)
# add_mlir_doc(toyOps toyOps toy/ -gen-op-doc)

set(LLVM_TARGET_DEFINITIONS toyDialect.td)
mlir_tablegen(toyDialect.h.inc -gen-dialect-decls)
mlir_tablegen(toyDialect.cpp.inc -gen-dialect-defs)
add_public_tablegen_target(toyDialectIncGen)

set(LLVM_TARGET_DEFINITIONS toyOps.td)
mlir_tablegen(toyOps.h.inc -gen-op-decls)
mlir_tablegen(toyOps.cpp.inc -gen-op-defs)
add_public_tablegen_target(toyOpsIncGen)

set(LLVM_TARGET_DEFINITIONS toyTypes.td)
mlir_tablegen(toyTypes.h.inc -gen-typedef-decls -typedefs-dialect=toy)
mlir_tablegen(toyTypes.cpp.inc -gen-typedef-defs -typedefs-dialect=toy)
add_public_tablegen_target(toyTypesIncGen)